import request from '@/utils/request'

// 查询集体讨论记录列表
export function listGroupDiscussion(query) {
  return request({
    url: '/ruoyi-system/groupdiscussion/list',
    method: 'get',
    params: query,
  })
}

// 查询集体讨论记录审批详细
export function getGroupDiscussion(id) {
  return request({
    url: '/ruoyi-system/groupdiscussion/' + id,
    method: 'get',
  })
}

// 新增集体讨论记录审批
export function addGroupDiscussion(data) {
  return request({
    url: '/ruoyi-system/groupdiscussion',
    method: 'post',
    data: data,
  })
}

// 修改集体讨论记录审批
export function updateGroupDiscussion(data) {
  return request({
    url: '/ruoyi-system/groupdiscussion',
    method: 'put',
    data: data,
  })
}

// 删除集体讨论记录审批
export function delGroupDiscussion(id) {
  return request({
    url: '/ruoyi-system/groupdiscussion/' + id,
    method: 'delete',
  })
}

// 预览

export function previewGroupDiscussion(params) {
  return request({
    url: '/ruoyi-system/groupdiscussion/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/groupdiscussion/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addGroupDiscussionFiles(data) {
  return request({
    url: '/ruoyi-system/groupdiscussion/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportGroupDiscussion(data) {
  return request({
    url: '/ruoyi-system/groupdiscussion/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/groupdiscussion/caseList',
    method: 'get',
  })
}

// 获取 案件处理审批表填的内容
export function getContent(id) {
  return request({
    url: '/ruoyi-system/groupdiscussion/getContent?caseId=' + id,
    method: 'get',
  })
}
